/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package 垃.圾;

/**
 *
 * @author EnzoZhong
 */
public abstract class Gun implements Runnable {

   private String target;
   private int port;
   private byte[] bullet;

   /**
    *
    */
   public Gun () {
   }

   /**
    *
    * @param target
    * @param port
    * @param bullet
    */
   public Gun ( String target , int port , byte[] bullet ) {
      this.target = target;
      this.port = port;
      this.bullet = bullet;
   }

   /**
    *
    * @param target
    * @param bullet
    */
   public Gun ( String target , byte[] bullet ) {
      this.target = target;
      this.bullet = bullet;
   }

   /**
    *
    * @param bullet
    */
   public void setBullet ( byte[] bullet ) {
      this.bullet = bullet;
   }

   /**
    *
    * @param port
    */
   public void setPort ( int port ) {
      this.port = port;
   }

   /**
    *
    * @param target
    */
   public void setTarget ( String target ) {
      this.target = target;
   }

   /**
    *
    * @return
    */
   public int getPort () {
      return port;
   }

   /**
    *
    * @return
    */
   public String getTarget () {
      return target;
   }

   /**
    *
    * @return
    */
   public byte[] getBullet () {
      return bullet;
   }

   @Override
   public String toString () {
      return "Gun{" + "target=" + target + ", port=" + port + ", bullet=" + bullet + '}';
   }
}
